#include <CL/opencl.h>

#include <string>
#include <map>
#include <vector>
using namespace std;

namespace PGL {
	struct argument {
		size_t argsize;
		void* argptr;
	};

	class pglPipelineState
	{
	public:
		pglPipelineState();
		cl_int enqueue(cl_command_queue cmdQueue, vector<cl_event> &waitEvents);
		vector<argument> arguments;
		map<string,cl_uint> argumentNames;

		cl_uint dimensions;
		size_t *globalWorkSize;
		size_t *localWorkSize;
		cl_kernel kernel;
		cl_event runEvent;
	private:
		cl_int setArgs();
	};

	class pglPipeline
	{
	public:
		pglPipeline();
		cl_int enqueue();

		vector<pglPipelineState> states;
	};
}